package com.loren.demo31.handler;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class CustomExceptionAdvice {
    @ExceptionHandler({Exception.class})
    public String handleException(Exception e) {
        return e.getMessage();
    }
}
